function init_firstTab() {
    $("#sale_first").editable({
        url: function (parame) {
            $.post(ctx + "saleConfig/updateSaleTrack", {saleUuid: 1, saleName: parame.value}, function (r) {if (r.code === 0) {$JuXue.n_success(r.msg);} else {$JuXue.n_danger(r.msg);}});
        }, pk: '', defaultValue: "", title: "初始",
        validate: function (value) { if (!$.trim(value)) {return '不能为空';}}
    });
    $("#sale_seconed").editable({
        url: function (parame) {
            $.post(ctx + "saleConfig/updateSaleTrack", {saleUuid: 2, saleName: parame.value}, function (r) {
                if (r.code === 0) {$JuXue.n_success(r.msg);} else {$JuXue.n_danger(r.msg);}
            });
        },
        pk: '', defaultValue: "", title: "阶段一",
        validate: function (value) { if (!$.trim(value)) {return '不能为空';}}
    });
    $("#sale_third").editable({
        url: function (parame) {
            $.post(ctx + "saleConfig/updateSaleTrack", {saleUuid: 3, saleName: parame.value}, function (r) {
                if (r.code === 0) {$JuXue.n_success(r.msg);} else {$JuXue.n_danger(r.msg);}
            });
        },
        pk: '', defaultValue: "", title: "阶段二",
        validate: function (value) { if (!$.trim(value)) {return '不能为空';}}
    });
    $("#sale_forth").editable({
        url: function (parame) {
            $.post(ctx + "saleConfig/updateSaleTrack", {saleUuid: 4, saleName: parame.value}, function (r) {
                if (r.code === 0) {$JuXue.n_success(r.msg);} else {$JuXue.n_danger(r.msg);}
            });
        },
        pk: '', defaultValue: "", title: "阶段三",
        validate: function (value) { if (!$.trim(value)) {return '不能为空';}}
    });
    $("#sale_fivth").editable({
        url: function (parame) {
            $.post(ctx + "saleConfig/updateSaleTrack", {saleUuid: 5, saleName: parame.value}, function (r) {
                if (r.code === 0) {$JuXue.n_success(r.msg);} else {$JuXue.n_danger(r.msg);}});
        },
        pk: '', defaultValue: "", title: "阶段四",
        validate: function (value) { if (!$.trim(value)) {return '不能为空';}}
    });
}



/**初始化资源修改**/
function init_secondTab(){
    $("#bigEmpzx").editable({
        url: function (parame) {
            $.post(ctx + "SeasConfig/updateSealConfig", {sgId: 1, sgDay: parame.value}, function (r) {
                if (r.code === 0) {$JuXue.n_success(r.msg);} else {$JuXue.n_danger(r.msg);}});
        }, pk: '', defaultValue: "", title: "大资源-自学考试",
        validate: function (value) { if (!$.trim(value)) {return '不能为空';}}
    });
    $("#bigEmpzpt").editable({
        url: function (parame) {
            $.post(ctx + "SeasConfig/updateSealConfig", {sgId: 2, sgDay: parame.value}, function (r) {if (r.code === 0) {$JuXue.n_success(r.msg);} else {$JuXue.n_danger(r.msg);}});
        }, pk: '', defaultValue: "", title: "大资源-普通专升本",
        validate: function (value) { if (!$.trim(value)) {return '不能为空';}}
    });
    $("#bigEmpzky").editable({
        url: function (parame) {
            $.post(ctx + "SeasConfig/updateSealConfig", {sgId: 3, sgDay: parame.value}, function (r) {if (r.code === 0) {$JuXue.n_success(r.msg);} else {$JuXue.n_danger(r.msg);}});
        }, pk: '', defaultValue: "", title: "大资源-考研辅导",
        validate: function (value) {if (!$.trim(value)) {return '不能为空';}}
    });
    $("#bigEmpzzy").editable({
        url: function (parame) {
            $.post(ctx + "SeasConfig/updateSealConfig", {sgId: 4, sgDay: parame.value}, function (r) {if (r.code === 0) {$JuXue.n_success(r.msg);} else {$JuXue.n_danger(r.msg);}});
        }, pk: '', defaultValue: "", title: "大资源-在职研",
        validate: function (value) {if (!$.trim(value)) {return '不能为空';}}
    });
    $("#bigEmpzzg").editable({
        url: function (parame) {
            $.post(ctx + "SeasConfig/updateSealConfig", {sgId: 5, sgDay: parame.value}, function (r) {if (r.code === 0) {$JuXue.n_success(r.msg);} else {$JuXue.n_danger(r.msg);}});
        }, pk: '', defaultValue: "", title: "大资源-教师资格证",
        validate: function (value) {if (!$.trim(value)) {return '不能为空';}}
    });
    $("#bigEmpzyy").editable({
        url: function (parame) {
            $.post(ctx + "SeasConfig/updateSealConfig", {sgId: 6, sgDay: parame.value}, function (r) {if (r.code === 0) {$JuXue.n_success(r.msg);} else {$JuXue.n_danger(r.msg);}});
        }, pk: '', defaultValue: "", title: "大资源-英语等级",
        validate: function (value) {if (!$.trim(value)) {return '不能为空';}}
    });
    $("#bigEmpzjs").editable({
        url: function (parame) {
            $.post(ctx + "SeasConfig/updateSealConfig", {sgId: 7, sgDay: parame.value}, function (r) {if (r.code === 0) {$JuXue.n_success(r.msg);} else {$JuXue.n_danger(r.msg);}});
        }, pk: '', defaultValue: "", title: "大资源-计算机等级",
        validate: function (value) {if (!$.trim(value)) {return '不能为空';}}
    });
    $("#bigEmpzck").editable({
        url: function (parame) {
            $.post(ctx + "SeasConfig/updateSealConfig", {sgId: 8, sgDay: parame.value}, function (r) {if (r.code === 0) {$JuXue.n_success(r.msg);} else {$JuXue.n_danger(r.msg);}});
        }, pk: '', defaultValue: "", title: "大资源-成考辅导",
        validate: function (value) {if (!$.trim(value)) {return '不能为空';}}
    });
    $("#bigEmpzwj").editable({
        url: function (parame) {
            $.post(ctx + "SeasConfig/updateSealConfig", {sgId: 9, sgDay: parame.value}, function (r) {if (r.code === 0) {$JuXue.n_success(r.msg);} else {$JuXue.n_danger(r.msg);}});
        }, pk: '', defaultValue: "", title: "大资源-网教统考",
        validate: function (value) {if (!$.trim(value)) {return '不能为空';}}
    });
    $("#bigEmpzzc").editable({
        url: function (parame) {
            $.post(ctx + "SeasConfig/updateSealConfig", {sgId: 10, sgDay: parame.value}, function (r) {if (r.code === 0) {$JuXue.n_success(r.msg);} else {$JuXue.n_danger(r.msg);}});
        }, pk: '', defaultValue: "", title: "大资源-总裁班",
        validate: function (value) {if (!$.trim(value)) {return '不能为空';}}
    });
    $("#bigEmpzcg").editable({
        url: function (parame) {
            $.post(ctx + "SeasConfig/updateSealConfig", {sgId: 11, sgDay: parame.value}, function (r) {if (r.code === 0) {$JuXue.n_success(r.msg);} else {$JuXue.n_danger(r.msg);}});
        }, pk: '', defaultValue: "", title: "大资源-出国留学",
        validate: function (value) {if (!$.trim(value)) {return '不能为空';}}
    });
    $("#bigEmpzik").editable({
        url: function (parame) {
            $.post(ctx + "SeasConfig/updateSealConfig", {sgId: 12, sgDay: parame.value}, function (r) {if (r.code === 0) {$JuXue.n_success(r.msg);} else {$JuXue.n_danger(r.msg);}});
        }, pk: '', defaultValue: "", title: "大资源-自考省外",
        validate: function (value) {if (!$.trim(value)) {return '不能为空';}}
    });
    $("#exEmpzx").editable({
        url: function (parame) {
            $.post(ctx + "SeasConfig/updateSealConfig", {sgId: 13, sgDay: parame.value}, function (r) {if (r.code === 0) {$JuXue.n_success(r.msg);} else {$JuXue.n_danger(r.msg);}});
        }, pk: '', defaultValue: "", title: "推广资源-自学考试",
        validate: function (value) {if (!$.trim(value)) {return '不能为空';}}
    });


    $("#exEmpzpt").editable({
        url: function (parame) {
            $.post(ctx + "SeasConfig/updateSealConfig", {sgId: 14, sgDay: parame.value}, function (r) {if (r.code === 0) {$JuXue.n_success(r.msg);} else {$JuXue.n_danger(r.msg);}});
        }, pk: '', defaultValue: "", title: "推广资源-普通专升本",
        validate: function (value) {if (!$.trim(value)) {return '不能为空';}}
    });
    $("#exEmpzky").editable({
        url: function (parame) {
            $.post(ctx + "SeasConfig/updateSealConfig", {sgId: 15, sgDay: parame.value}, function (r) {if (r.code === 0) {$JuXue.n_success(r.msg);} else {$JuXue.n_danger(r.msg);}});
        }, pk: '', defaultValue: "", title: "推广资源-考研辅导",
        validate: function (value) {if (!$.trim(value)) {return '不能为空';}}
    });
    $("#exEmpzzy").editable({
        url: function (parame) {
            $.post(ctx + "SeasConfig/updateSealConfig", {sgId: 16, sgDay: parame.value}, function (r) {if (r.code === 0) {$JuXue.n_success(r.msg);} else {$JuXue.n_danger(r.msg);}});
        }, pk: '', defaultValue: "", title: "推广资源-在职研",
        validate: function (value) {if (!$.trim(value)) {return '不能为空';}}
    });
    $("#exEmpzzg").editable({
        url: function (parame) {
            $.post(ctx + "SeasConfig/updateSealConfig", {sgId: 17, sgDay: parame.value}, function (r) {if (r.code === 0) {$JuXue.n_success(r.msg);} else {$JuXue.n_danger(r.msg);}});
        }, pk: '', defaultValue: "", title: "推广资源-教师资格证",
        validate: function (value) {if (!$.trim(value)) {return '不能为空';}}
    });
    $("#exEmpzyy").editable({
        url: function (parame) {
            $.post(ctx + "SeasConfig/updateSealConfig", {sgId: 18, sgDay: parame.value}, function (r) {if (r.code === 0) {$JuXue.n_success(r.msg);} else {$JuXue.n_danger(r.msg);}});
        }, pk: '', defaultValue: "", title: "推广资源-英语等级",
        validate: function (value) {if (!$.trim(value)) {return '不能为空';}}
    });
    $("#exEmpzjs").editable({
        url: function (parame) {
            $.post(ctx + "SeasConfig/updateSealConfig", {sgId: 19, sgDay: parame.value}, function (r) {if (r.code === 0) {$JuXue.n_success(r.msg);} else {$JuXue.n_danger(r.msg);}});
        }, pk: '', defaultValue: "", title: "推广资源-计算机等级",
        validate: function (value) {if (!$.trim(value)) {return '不能为空';}}
    });
    $("#exEmpzck").editable({
        url: function (parame) {
            $.post(ctx + "SeasConfig/updateSealConfig", {sgId: 20, sgDay: parame.value}, function (r) {if (r.code === 0) {$JuXue.n_success(r.msg);} else {$JuXue.n_danger(r.msg);}});
        }, pk: '', defaultValue: "", title: "推广资源-成考辅导",
        validate: function (value) {if (!$.trim(value)) {return '不能为空';}}
    });
    $("#exEmpzwj").editable({
        url: function (parame) {
            $.post(ctx + "SeasConfig/updateSealConfig", {sgId: 21, sgDay: parame.value}, function (r) {if (r.code === 0) {$JuXue.n_success(r.msg);} else {$JuXue.n_danger(r.msg);}});
        }, pk: '', defaultValue: "", title: "推广资源-网教统考",
        validate: function (value) {if (!$.trim(value)) {return '不能为空';}}
    });
    $("#exEmpzzc").editable({
        url: function (parame) {
            $.post(ctx + "SeasConfig/updateSealConfig", {sgId: 22, sgDay: parame.value}, function (r) {if (r.code === 0) {$JuXue.n_success(r.msg);} else {$JuXue.n_danger(r.msg);}});
        }, pk: '', defaultValue: "", title: "推广资源-总裁班",
        validate: function (value) {if (!$.trim(value)) {return '不能为空';}}
    });
    $("#exEmpzcg").editable({
        url: function (parame) {
            $.post(ctx + "SeasConfig/updateSealConfig", {sgId: 23, sgDay: parame.value}, function (r) {if (r.code === 0) {$JuXue.n_success(r.msg);} else {$JuXue.n_danger(r.msg);}});
        }, pk: '', defaultValue: "", title: "推广资源-出国留学",
        validate: function (value) {if (!$.trim(value)) {return '不能为空';}}
    });
    $("#exEmpzik").editable({
        url: function (parame) {
            $.post(ctx + "SeasConfig/updateSealConfig", {sgId: 24, sgDay: parame.value}, function (r) {if (r.code === 0) {$JuXue.n_success(r.msg);} else {$JuXue.n_danger(r.msg);}});
        }, pk: '', defaultValue: "", title: "推广资源-自考省外",
        validate: function (value) {if (!$.trim(value)) {return '不能为空';}}
    });


    $("#aiEmpzx").editable({
        url: function (parame) {
            $.post(ctx + "SeasConfig/updateSealConfig", {sgId: 25, sgDay: parame.value}, function (r) {if (r.code === 0) {$JuXue.n_success(r.msg);} else {$JuXue.n_danger(r.msg);}});
        }, pk: '', defaultValue: "", title: "Ai资源-自学考试",
        validate: function (value) {if (!$.trim(value)) {return '不能为空';}}
    });
    $("#aiEmpzpt").editable({
        url: function (parame) {
            $.post(ctx + "SeasConfig/updateSealConfig", {sgId: 26, sgDay: parame.value}, function (r) {if (r.code === 0) {$JuXue.n_success(r.msg);} else {$JuXue.n_danger(r.msg);}});
        }, pk: '', defaultValue: "", title: "Ai资源-普通专升本",
        validate: function (value) {if (!$.trim(value)) {return '不能为空';}}
    });
    $("#aiEmpzky").editable({
        url: function (parame) {
            $.post(ctx + "SeasConfig/updateSealConfig", {sgId: 27, sgDay: parame.value}, function (r) {if (r.code === 0) {$JuXue.n_success(r.msg);} else {$JuXue.n_danger(r.msg);}});
        }, pk: '', defaultValue: "", title: "Ai资源-考研辅导",
        validate: function (value) {if (!$.trim(value)) {return '不能为空';}}
    });
    $("#aiEmpzzy").editable({
        url: function (parame) {
            $.post(ctx + "SeasConfig/updateSealConfig", {sgId: 28, sgDay: parame.value}, function (r) {if (r.code === 0) {$JuXue.n_success(r.msg);} else {$JuXue.n_danger(r.msg);}});
        }, pk: '', defaultValue: "", title: "Ai资源-在职研",
        validate: function (value) {if (!$.trim(value)) {return '不能为空';}}
    });
    $("#aiEmpzzg").editable({
        url: function (parame) {
            $.post(ctx + "SeasConfig/updateSealConfig", {sgId: 29, sgDay: parame.value}, function (r) {if (r.code === 0) {$JuXue.n_success(r.msg);} else {$JuXue.n_danger(r.msg);}});
        }, pk: '', defaultValue: "", title: "Ai资源-教师资格证",
        validate: function (value) {if (!$.trim(value)) {return '不能为空';}}
    });
    $("#aiEmpzyy").editable({
        url: function (parame) {
            $.post(ctx + "SeasConfig/updateSealConfig", {sgId: 30, sgDay: parame.value}, function (r) {if (r.code === 0) {$JuXue.n_success(r.msg);} else {$JuXue.n_danger(r.msg);}});
        }, pk: '', defaultValue: "", title: "Ai资源-英语等级",
        validate: function (value) {if (!$.trim(value)) {return '不能为空';}}
    });
    $("#aiEmpzjs").editable({
        url: function (parame) {
            $.post(ctx + "SeasConfig/updateSealConfig", {sgId: 31, sgDay: parame.value}, function (r) {if (r.code === 0) {$JuXue.n_success(r.msg);} else {$JuXue.n_danger(r.msg);}});
        }, pk: '', defaultValue: "", title: "Ai资源-计算机等级",
        validate: function (value) {if (!$.trim(value)) {return '不能为空';}}
    });
    $("#aiEmpzck").editable({
        url: function (parame) {
            $.post(ctx + "SeasConfig/updateSealConfig", {sgId: 32, sgDay: parame.value}, function (r) {if (r.code === 0) {$JuXue.n_success(r.msg);} else {$JuXue.n_danger(r.msg);}});
        }, pk: '', defaultValue: "", title: "Ai资源-成考辅导",
        validate: function (value) {if (!$.trim(value)) {return '不能为空';}}
    });
    $("#aiEmpzwj").editable({
        url: function (parame) {
            $.post(ctx + "SeasConfig/updateSealConfig", {sgId: 33, sgDay: parame.value}, function (r) {if (r.code === 0) {$JuXue.n_success(r.msg);} else {$JuXue.n_danger(r.msg);}});
        }, pk: '', defaultValue: "", title: "Ai资源-网教统考",
        validate: function (value) {if (!$.trim(value)) {return '不能为空';}}
    });
    $("#aiEmpzzc").editable({
        url: function (parame) {
            $.post(ctx + "SeasConfig/updateSealConfig", {sgId: 34, sgDay: parame.value}, function (r) {if (r.code === 0) {$JuXue.n_success(r.msg);} else {$JuXue.n_danger(r.msg);}});
        }, pk: '', defaultValue: "", title: "Ai资源-总裁班",
        validate: function (value) {if (!$.trim(value)) {return '不能为空';}}
    });
    $("#aiEmpzcg").editable({
        url: function (parame) {
            $.post(ctx + "SeasConfig/updateSealConfig", {sgId: 35, sgDay: parame.value}, function (r) {if (r.code === 0) {$JuXue.n_success(r.msg);} else {$JuXue.n_danger(r.msg);}});
        }, pk: '', defaultValue: "", title: "Ai资源-出国留学",
        validate: function (value) {if (!$.trim(value)) {return '不能为空';}}
    });
    $("#aiEmpzik").editable({
        url: function (parame) {
            $.post(ctx + "SeasConfig/updateSealConfig", {sgId: 36, sgDay: parame.value}, function (r) {if (r.code === 0) {$JuXue.n_success(r.msg);} else {$JuXue.n_danger(r.msg);}});
        }, pk: '', defaultValue: "", title: "Ai资源-自考省外",
        validate: function (value) {if (!$.trim(value)) {return '不能为空';}}
    });
}

/**更新状态**/
function changeUpStatus(btn){
    var dataud  = $(btn).attr("data");
    $.post(ctx + "SeasConfig/updateSealConfig", {sgId: dataud, sgStatus: "1"}, function (r) {
        if (r.code === 0) {
            $(btn).text("暂停");
            $JuXue.n_success(r.msg);
            $(btn).removeClass("btn-success").addClass("btn-danger").attr("onclick","changeDownStatus(this)");;
        } else {$JuXue.n_danger(r.msg);}
    });
}

/**正常**/
function changeDownStatus(btn){
    var dataud  = $(btn).attr("data");
    $.post(ctx + "SeasConfig/updateSealConfig", {sgId: dataud, sgStatus: "0"}, function (r) {
        if (r.code === 0) {
            $JuXue.n_success(r.msg);
            $(btn).text("正常");
            $(btn).removeClass("btn-danger").addClass("btn-success").attr("onclick","changeUpStatus(this)");
        } else {$JuXue.n_danger(r.msg);}
    });
}

//点击分配配置
function clickTabFen(btn) {
    var data = $(btn).attr("data");
    chooseFen(data);
    $("#exConfig_form").empty();
    sessionStorage.setItem("clickTabFen",data);
    $("#deptjsTree_json").jstree('uncheck_all');

}

//点击分配配置
function clickTabFenG(btn) {
    var data = $(btn).attr("data");
    chooseFenG(data);
    $("#exConfig_formG").empty();
    sessionStorage.setItem("clickTabFenG",data);
    $("#grad_form").find('input').each(function (index,val) {
        $(this).val('');
    });
    $("#deptjsTree_jsonG").jstree('uncheck_all');
}

function clickTabTuiG(btn) {
    var data = $(btn).attr("data");
    $("#deptListExtG").empty();
    chooseTuiG(data);
    sessionStorage.setItem("clickTabTuiG",data);
    $("#userDingjsTree_jsonG").jstree("destroy");
}

//点击推送配置
function clickTabTui(btn) {
    var data = $(btn).attr("data");
    $("#deptListExt").find("div").removeClass("bg-blue-1");
    chooseTui(data);
    $("#selectDiffBut").empty().append('<button type="button" onclick="changeTuiSongConfig(this)" data="1"  class="m-l-30 btn btn-xs btn-success">部门正常</button>');
    $("#selectDiffButInter").empty().append('<button type="button" onclick="changeInternConfig(this)" data="1"  class="m-l-30 btn btn-xs btn-success">项目正常</button>');
    $("#userDingjsTree_json").jstree("destroy");
    sessionStorage.setItem("clickTabTui",data);
}